/**
 * 
 */
package kr.co.insoft.driver.model;

import java.io.Serializable;
import java.util.Collection;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import kr.co.insoft.driver.util.NullExcludeTransformer;
import flexjson.JSONSerializer;

/**
 * Driver 용 InstanceModel 객체
 * 
 * @author IN-SOFT Inc. GoodwillDD(sylee@in-soft.co.kr)
 * 
 */
public class InstanceModel implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -4024909201657578250L;

	public InstanceModel() {

	}

	public String toString() {
		return (new JSONSerializer())
				.transform(new NullExcludeTransformer(), void.class)
				.exclude("*.class").deepSerialize(this);
	}

	String ramdiskId;
	String platform;
	String kernelId;
	String hypervisor;
	String architecture;
	String instanceId;
	String instanceName;
	String imageId;
	String instanceType;
	Integer launchCount; /* this value minCount in amazon */
	String securityGroup;
	String keyName;
	String zone;
	Date launchTime;
	String privateDnsName;
	Set<String> privateIpAddress;
	String publicDnsName;
	Set<String> publicIpAddress;
	String currentState;

	public Collection<String> getSecurityGroups() {
		HashSet<String> securityGroups = new HashSet<String>();
		securityGroups.add(this.securityGroup);
		return securityGroups;
	}

	/**
	 * @return the securityGroup
	 */
	public String getSecurityGroup() {
		return securityGroup;
	}

	/**
	 * @param securityGroup
	 *            the securityGroup to set
	 */
	public void setSecurityGroup(String securityGroup) {
		this.securityGroup = securityGroup;
	}

	/**
	 * @return the imageId
	 */
	public String getImageId() {
		return imageId;
	}

	/**
	 * @param imageId
	 *            the imageId to set
	 */
	public void setImageId(String imageId) {
		this.imageId = imageId;
	}

	/**
	 * @return the instanceType
	 */
	public String getInstanceType() {
		return instanceType;
	}

	/**
	 * @param instanceType
	 *            the instanceType to set
	 */
	public void setInstanceType(String instanceType) {
		this.instanceType = instanceType;
	}

	/**
	 * @return the launchCount
	 */
	public Integer getLaunchCount() {
		return launchCount;
	}

	/**
	 * @param launchCount
	 *            the launchCount to set
	 */
	public void setLaunchCount(Integer launchCount) {
		this.launchCount = launchCount;
	}

	/**
	 * @return the keyName
	 */
	public String getKeyName() {
		return keyName;
	}

	/**
	 * @param keyName
	 *            the keyName to set
	 */
	public void setKeyName(String keyName) {
		this.keyName = keyName;
	}

	/**
	 * @return the zone
	 */
	public String getZone() {
		return zone;
	}

	/**
	 * @param zone
	 *            the zone to set
	 */
	public void setZone(String zone) {
		this.zone = zone;
	}

	/**
	 * @return the instanceId
	 */
	public String getInstanceId() {
		return instanceId;
	}

	/**
	 * @param instanceId
	 *            the instanceId to set
	 */
	public void setInstanceId(String instanceId) {
		this.instanceId = instanceId;
	}

	/**
	 * @return the launchTime
	 */
	public Date getLaunchTime() {
		return launchTime;
	}

	/**
	 * @param launchTime
	 *            the launchTime to set
	 */
	public void setLaunchTime(Date launchTime) {
		this.launchTime = launchTime;
	}

	/**
	 * @return the instanceName
	 */
	public String getInstanceName() {
		return instanceName;
	}

	/**
	 * @param instanceName
	 *            the instanceName to set
	 */
	public void setInstanceName(String instanceName) {
		this.instanceName = instanceName;
	}

	/**
	 * @return the currentState
	 */
	public String getCurrentState() {
		return currentState;
	}

	/**
	 * @param currentState
	 *            the currentState to set
	 */
	public void setCurrentState(String currentState) {
		this.currentState = currentState;
	}

	/**
	 * @return the ramdiskId
	 */
	public String getRamdiskId() {
		return ramdiskId;
	}

	/**
	 * @param ramdiskId
	 *            the ramdiskId to set
	 */
	public void setRamdiskId(String ramdiskId) {
		this.ramdiskId = ramdiskId;
	}

	/**
	 * @return the platform
	 */
	public String getPlatform() {
		return platform;
	}

	/**
	 * @param platform
	 *            the platform to set
	 */
	public void setPlatform(String platform) {
		this.platform = platform;
	}

	/**
	 * @return the kernelId
	 */
	public String getKernelId() {
		return kernelId;
	}

	/**
	 * @param kernelId
	 *            the kernelId to set
	 */
	public void setKernelId(String kernelId) {
		this.kernelId = kernelId;
	}

	/**
	 * @return the hypervisor
	 */
	public String getHypervisor() {
		return hypervisor;
	}

	/**
	 * @param hypervisor
	 *            the hypervisor to set
	 */
	public void setHypervisor(String hypervisor) {
		this.hypervisor = hypervisor;
	}

	/**
	 * @return the architecture
	 */
	public String getArchitecture() {
		return architecture;
	}

	/**
	 * @param architecture
	 *            the architecture to set
	 */
	public void setArchitecture(String architecture) {
		this.architecture = architecture;
	}

	/**
	 * @return the privateDnsName
	 */
	public String getPrivateDnsName() {
		return privateDnsName;
	}

	/**
	 * @param privateDnsName
	 *            the privateDnsName to set
	 */
	public void setPrivateDnsName(String privateDnsName) {
		this.privateDnsName = privateDnsName;
	}

	/**
	 * @return the privateIpAddress
	 */
	public Set<String> getPrivateIpAddress() {
		return privateIpAddress;
	}

	/**
	 * @param privateIpAddress
	 *            the privateIpAddress to set
	 */
	public void setPrivateIpAddress(Set<String> privateIpAddress) {
		this.privateIpAddress = privateIpAddress;
	}

	/**
	 * @return the publicDnsName
	 */
	public String getPublicDnsName() {
		return publicDnsName;
	}

	/**
	 * @param publicDnsName
	 *            the publicDnsName to set
	 */
	public void setPublicDnsName(String publicDnsName) {
		this.publicDnsName = publicDnsName;
	}

	/**
	 * @return the publicIpAddress
	 */
	public Set<String> getPublicIpAddress() {
		return publicIpAddress;
	}

	/**
	 * @param publicIpAddress
	 *            the publicIpAddress to set
	 */
	public void setPublicIpAddress(Set<String> publicIpAddress) {
		this.publicIpAddress = publicIpAddress;
	}

}
